package nus.ss.thread.ticket;

public class Ticket {
    //多线程并发 关心的是一张票是否被卖出多次 聚焦的是票的数量
    private int num;

    public Ticket(int num) {
        this.num = num;
    }

    public int getNum() {
        return num;
    }

    public void sale() {
        num--;
    }
}
